{% extends "layout.html" %}

{% block title %}admin{% endblock %}

{% block content %}


    <h3>当前用户的所有工单列表</h3>
    <table border="1px">
        <thead>
            <tr>
                <td>工单编号</td>
                <td>工单类型</td>
                <td>工单状态</td>
                <td>工单详细</td>
                <td>创建人</td>
                <td>操作人</td>
                <td>创建时间</td>
                <td>修改时间</td>
            </tr>
        </thead>
        <tbody>
            {% for row in item_list %}
                <tr>
                    <td>{{ row.order_id }}</td>
                    <td>{{ row.order_type.item_cls_name }}</td>
                    <td>{{ row.order_status.status_name }}</td>
                    <td>{{ row.comments }}</td>
                    <td>{{ row.create_user.name }}</td>
                    <td>{{ row.active_user.name }}</td>
                    <td>{{ row.create_time }}</td>
                    <td>{{ row.update_time }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

    <h3>当前用户待审批的工单列表</h3>
    <table border="1px">
        <thead>
            <tr>
                <td>工单编号</td>
                <td>工单类型</td>
                <td>工单状态</td>
                <td>工单详细</td>
                <td>创建人</td>
                <td>操作人</td>
                <td>创建时间</td>
                <td>修改时间</td>
                <td>操作</td>
            </tr>
        </thead>
        <tbody>
            {% for row in require_action_list %}
                <tr>
                    <td>{{ row.order_id }}</td>
                    <td>{{ row.order_type.item_cls_name }}</td>
                    <td>{{ row.order_status.status_name }}</td>
                    <td>{{ row.comments }}</td>
                    <td>{{ row.create_user.name }}</td>
                    <td>{{ row.active_user.name }}</td>
                    <td>{{ row.create_time }}</td>
                    <td>{{ row.update_time }}</td>
                    <td>
                        <a href="/admin/item/detail/{{ row.order_id }}">详细</a>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

{% endblock %}

